<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.dic.service.WorddictionaryService"%>
<%@ page import="com.dic.dao.*"%>
<%@ page import="com.dic.dao.model.*"%>

<%
    request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    
    String subject=request.getParameter("subject");
    
    //System.out.println("taskCondition:"+subject);
    //顺序为：未完成、完成、存在疑问（降序排列）
    //顺序为：通过、未通过、未审查、空白
    WorddictionaryService ser = new WorddictionaryService();
    List<Integer> list1=ser.finishcondition(subject);
    List<Integer> list2=ser.passcondition(subject);
    
    if(list1==null){
       list1.add(0);
       list1.add(0);
       list1.add(0);
    }else if(list1.size()<3){
       while(list1.size()<3){
          list1.add(0);
       }
    }
    if(list2==null){
       list2.add(0);
       list2.add(0);
       list2.add(0);
    }else if(list2.size()<3){
       while(list2.size()<3){
          list2.add(0);
       }
    }
    
    out.print("{'unfinished':'" + list1.get(0) + "','finished':'" + list1.get(1) + "','doubt':'" + list1.get(2) + "','pass':'" + list2.get(0) + "','unpass':'" + list2.get(1) + "','uncheck':'" + list2.get(2) + "'}");
    
    
%>